<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        /*块级元素的diplay的默认值是block*/
        /*行级元素的display的默认值是inline,行级元素无法设置宽度和高度*/
        .d1{
            width:200px;
            height: 200px;
            background: yellow;
            /*将块级元素变成行级元素*/
            display: inline;
        }
        .s1{

            width:200px;
            height: 200px;
            background:pink;
            /*将行级元素变成块级元素*/
            display: block;
        }
    </style>
</head>
<body>
    <div class="d1">div</div>
    <span class="s1">span</span>
</body>
</html>